
const msgPath = process.env.HUSKY_GIT_PARAMS;
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim();

const aggreeCommitReg = /^(feat|fix)(\(.+\))?:.{1,50}/;

if (!aggreeCommitReg.test(msg)) {
  console.log(`error: 不合法的提交格式，参考格式为feat(xxx):xxx哦`);
  process.exit(1);
}
